import {
  GraphQLList,
  GraphQLObjectType,
  GraphQLSchema,
  GraphQLString,
  GraphQLInt,
  GraphQLFloat,
  GraphQLEnumType,
  GraphQLNonNull
} from 'graphql';

export default new GraphQLObjectType({
  name: 'PeriodSummery',
  description: '区间概略信息（一支K线）',
  fields: {
    date: {
      type: GraphQLInt,
      description: '日期`20170702`'
    },
    time: {
      type: GraphQLInt,
      description: '时分`11:22`'
    },
    high: {
      type: new GraphQLNonNull(GraphQLFloat),
      description: '最高价'
    },
    low: {
      type: new GraphQLNonNull(GraphQLFloat),
      description: '最低价'
    },
    open: {
      type: new GraphQLNonNull(GraphQLFloat),
      description: '开盘价'
    },
    close: {
      type: new GraphQLNonNull(GraphQLFloat),
      description: '收盘价'
    },
    volume: {
      type: GraphQLFloat,
      description: '成交量'
    },
    turnover: {
      type: GraphQLFloat,
      description: '成交额'
    }
  }
})
